/*
 * Copyright (C) 2007 The Android  Source Project
 *
 * Licensed under the RichenInfo License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.richeninfo.com/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.example.zhangwei;

import java.io.File;

import android.os.Environment;

/**
 * @ClassName: Constants
 * @Description: 系统常量类，存放所有公用常量
 * @author: davidzhang
 * @date:2013-2-16 下午5:38:04
 */
public final class Constants {

    public static final String ACTIVITY_DATA = "data_activity";
    
    public static final String[] MAIN_LISTVIEW_NAME = {"activity生命周期","service绑定service+广播"};
    /** 传值key */
    public static final class PassDataKey {
		
		public static final String PARCELABLE = "parcelablekey";
		public static final String SERIALIZABLE = "serializablekey";
		public static final String DATA_TEXT = "datekey";
		
	}
    
	public static final class path {
		/** 应用的目录 */
		public static final String APP_DIR = Environment.getExternalStorageDirectory() + File.separator+"ZHANGWEI";
		public static final String FILE_DIR = APP_DIR+File.separator+"file";
	    public static final String IMAGE_DIR = APP_DIR+File.separator+"image";
	    public static final String LOG_DIR = APP_DIR+File.separator+"log";
	}
	
	public static final class connection{
//		  public static final String ROOT_URL = "http://116.228.233.9/DFH/";
		  public static final String ROOT_URL = "https://192.168.1.196:8443/DFH/";
		  public static final String USER_URL = ROOT_URL+"user";
		  public static final String OPTION_URL = ROOT_URL+"option";
		  public static final String TOPIC_URL = ROOT_URL+"topic";
		  public static final String TOPIC_CIRCLE = ROOT_URL+"circle";
		  public static final String MUC_URL = ROOT_URL+"muc";
		  public static final int TIMEOUT = 15000;
		  public static final int CHAT_SERVER_PORT = 5222;
//		  public static final String CHAT_SERVER_URL = "116.228.233.9";
		  
		  public static final String CHAT_SERVER_URL = "192.168.1.195";
		  public static final String CHAT_SERVER_DOMAIN = "chat.richeninfo";
		  public static final String CONFERENCE = "conference.chat.richeninfo";
		  
		  //version ip 
		  public static String VIP = "";
		  //content ip
		  public static String CIP = "";
		  //picture ip 
		  public static String PIP = "";
		  public static String APK_URL = "";
	}
	public static final class InterfaceName{
		
	}
	
	public static final class preferencesFiled{
		//connection filed
		public static final String IS_AGREE_PROTOCOL = "IS_AGREE_PROTOCOL";
		public static final String IS_REMENMBER_PASSWORD = "IS_REMENMBER_PASSWORD";
		public static final String PASSWORD = "PASSWORD";
		public static final String USERNAME = "USERNAME";
		
		
	}
	public static final class web{
    	public static final int CONNECTION_TIMEOUT = 30000; // ms
    	public static final int SOCKET_TIMEOUT = 30000; // ms
    }
	
	public static final class chat{
		
		//body$$$中文名称$$$消息的type$$$url
		
		/**登录用户的聊天jid*/
		public static String user = "";
		
		/**登录用户的中文名*/
		public static String showName = "";
		
		/**登录用户的userId*/
		public static int userId;
		
		/**登录用户所在的圈子组id*/
		public static int groupId;
		
		/**登录用户的权限*/
		public static int permission;
		
		/**登录用户的username*/
		public static String loginName;
		
		/**普通消息*/
		public static final int MSG_TYPE_ORDINARY = -1;
		
		/**申请入群的消息*/
		public static final int MSG_TYPE_APPLIED_TO_JOIN_ROOM = 0;
		
		/**被邀请*/
		public static final int MSG_TYPE_INVITATION_ROOM = 1;
		
		/**好友申请*/
		public static final int MSG_TYPE_APPLIED_TO_FRIEND = 2;
		
		/**对方同意好友申请*/
		public static final int MSG_TYPE_AGREE_FRIEND = 3;
		
		/**对方拒绝好友申请*/
		public static final int MSG_TYPE_REFUSE_FRIEND = 4;
		
		/**好友分享的话题*/
		public static final int MSG_TYPE_SHARE = 5;
		
		
		/**对方接受入群邀请*/
		public static final int MSG_TYPE_AGREE_INVITATION_ROOM = 6;
		

		/**群主同意入群申请*/
		public static final int MSG_TYPE_AGREE_JOIN_ROOM = 7;
	}
	
	
}
